<?php

class data_admin {
	$data_connection;
	
	function __construct($file) {
		if (!file_exists($file)) 
			throw new Exception('Given database file not found.');
		
		
		$data_connection = SQLite3($file);
	}
	
	public static function add_activity($name, $description, $latitude = 0, $longitude = 0, $max_people = 0, $min_people = 0, $max_minutes = 0, $min_minutes = 0) {
	
		$location_given = 0;
		
		// Name cannot be empty
		if ($name == "")
			throw new Exception('Name field cannot be empty');
		
		if ($description == "")
			throw new Exception('Description field cannot be empty');
			
		if ($latitude == 0 AND $longitude == 0)
			
	}
}


?>

/*

activity_id INTEGER PRIMARY KEY,
			location_given INTEGER,
			max_people INTEGER,
			min_people INTEGER,
			max_minutes INTEGER,
			min_minutes INTEGER,
			min_cost REAL,
			max_cost REAL,
			name VARCHAR(255) NOT NULL,
			description TEXT NOT NULL,
			latitude REAL,
			longitude REAL

*/